new Vue({
    el: '#app',
    data() {
        return {
            token: '',
            featuresList: [{ // 功能入口数据
                name: '供应大厅',
                icon: '/admin/icon/supply.png',
                path: '/pages/index/supply'
            },
            {
                name: '采购大厅',
                icon: '/admin/icon/industry_services.png',
                path: '/pages/index/purchase'
            },
            {
                name: '企业专区',
                icon: '/admin/icon/enterprise.png',
                path: '/pages/index/enterprise'
            },
            {
                name: '产业服务',
                icon: '/admin/icon/purchase.png',
                path: '/pages/index/news'
            },
            {
                name: '商家入驻',
                icon: '/admin/icon/merchant.png',
                path: ''
            },
            {
                name: '专家服务',
                icon: '/admin/icon/expert-service.png',
                path: ''
            },
            {
                name: '关于我们',
                icon: '/admin/icon/about_us.png',
                path: '/pages/index/aboutus'
            }
        ],
        }
    },
    beforeCreate() {
        function setRem() {
            const designWidth = 750; // 设计稿宽度（rpx）
            const maxWidth = 540; // 可选：限制最大宽度（如手机端常见值）
            const screenWidth = Math.min(window.innerWidth, maxWidth);
            const scale = screenWidth / designWidth;
            document.documentElement.style.fontSize = scale + 'px';
        }
        setRem();//1rem = 0.5px 对标小程序在 375px 宽的屏幕上，1rpx = 0.5px（因为 750rpx / 375px = 2）
    },
    mounted() {
        let URL = window.location.href;
        this.token = getQueryObject(URL, 'token');
    },
    computed: {

    },
    methods: {
        toPath(url) {//跳转页面
            if(url) {
                window.location.href = `../../${url}.html`;
            } else {
                this.$showToast({
                    title:'暂未开放'
                });
            }
        },
    },
})
